<template>
    <GrandParentComponent></GrandParentComponent>
</template>
<script>
import GrandParentComponent from '@/components/GrandParentComponent.vue';

export default {
    components: { GrandParentComponent },
    beforeRouteEnter(to, from, next) {
        console.log("组件内守卫 beforeRouteEnter, %s => %s", from.path, to.path)
        next()
    }, beforeRouteUpdate(to, from, next) {
        console.log("组件内守卫 beforeRouteUpdate, %s => %s", from.path, to.path)
        next()
    }, beforeRouteLeave(to, from, next) {
        console.log("组件内守卫 beforeRouteLeave, %s => %s", from.path, to.path)
        next()
    }
}
</script>
